home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / disktime.zip / DISKTIME.PAS < prev    next >
Pascal/Delphi Source File  |  1985-11-03  |  2KB  |  82 lines

  1. Program DiskTime;
  2. {
  3.  
  4.    This program measures the time taken to execute seeks to random
  5.    places on the IBM-PC & compatible hard disk.  It is completely
  6.    safe, and will not alter the data on your hard disk in any way.
  7.  
  8.    Restrictions:
  9.  
  10.    This program uses INT 13h to communicate with the IBM-PC/XT and
  11.    IBM-PC/AT hard disk.  If you have problems on a compatible then
  12.    it is not as compatible as you thought...
  13.  
  14.    Notice:
  15.  
  16.    A limited licence is granted to all users of this program
  17.    to make copies and distribute them provided that
  18.  
  19.       o This notice is not removed
  20.       o The program is not distirbuted in modified form
  21.       o No fee is charged for copying or distributing
  22.  
  23.    Modifications:
  24.  
  25.       Who            When           What
  26.       ---            ----           ----
  27.    Y.N. Miles      31-Oct-85      Original in Turbo Pascal 3.0
  28.  
  29.    Y.N. Miles      01-Nov-85      Use Turbo's RANDOM(Max) Function
  30.                                   Add documentation in comments
  31.  
  32.    Y.N. Miles      02-Nov-85      New procedure to print banner
  33.                                   New procedure to recalibrate drive
  34.                                   Rename variable MaxCyl to CylMax
  35.                                   in procedure MaxCyl
  36.  
  37. }
  38. Const
  39.    Thismany:Integer=1000;
  40. Var
  41.    Cylinder:Integer;
  42.    CylMax:Integer;
  43.    Drive:Integer;
  44.    Seeks:Integer;
  45.    Start:Real;
  46.    Elapsed:Real;
  47. {$IBANNER.PAS}
  48. {$IASK.PAS}
  49. {$IMAXCYL.PAS}
  50. {$IRECAL.PAS}
  51. {$ISEEK.PAS}
  52. {$ISECNDS.PAS}
  53. {$IRESULTS.PAS}
  54. Begin
  55.      Banner;
  56.      Ask(Drive);
  57.      Maxcyl(Drive,CylMax);
  58.      Recalibrate(Drive,CylMax);
  59.  
  60.      Write('Testing ');
  61.      NormVideo;
  62.      Write(ThisMany);
  63.      LowVideo;
  64.      Write(' cylinders or until ');
  65.      NormVideo;
  66.      Write('any key');
  67.      LowVideo;
  68.      Writeln(' is pressed...');
  69.  
  70.      Seeks:=0;
  71.      Start:=Secnds;
  72.  
  73.      While (KeyPressed xor (Seeks<>ThisMany)) do
  74.            Begin
  75.                 Cylinder:=Random(CylMax);
  76.                 Seek(Drive,Cylinder);
  77.                 Seeks:=Seeks+1;
  78.            End;
  79.  
  80.      Elapsed:=Secnds-Start;
  81.      Results(Elapsed,Seeks);
  82. End.